import request from '@/utils/request'
/**
 * (WipTraceTask)表实体类
 *
 * @author makejava
 * @since 2024-12-20 15:10:13
 */

export const entityPut={
    id: null,  //ID
    partNo: null,  //零件编号
    standardQuantity: null,  //标准数量
    tagCode: null,  //标签编号
    productSerialNo: null,  //产品流转号
    materialNo: null,  //材料炉号
    processNo: null,  //工序号
    processName: null,  //工序名称
    processType: null,  //工序类型
    processState: null,  //工序状态
    registrationTime: null,  //挂接时间
    startTime: null,  //上工时间
    startPosition: null,  //上工设备
    startBy: null,  //上工工号
    receipts: null,  //领用总数
    total: null,  //报工总数
    quantity: null,  //合格品数量
    unQuantity: null,  //不良品数量
    completionTime: null,  //报工时间
    completionPosition: null,  //报工设备
    completionBy: null,  //报工工号
    wipPlanSalesId: null,  //wip_plan_sales_id
    createTime: null,  //创建时间
    createBy: null,  //创建人
    updateTime: null,  //更新时间
    updateBy: null,  //更新人
}
export const entityPo={
    id: null,  //ID
    partNo: null,  //零件编号
    standardQuantity: null,  //标准数量
    tagCode: null,  //标签编号
    productSerialNo: null,  //产品流转号
    materialNo: null,  //材料炉号
    processNo: null,  //工序号
    processName: null,  //工序名称
    processType: null,  //工序类型
    processState: null,  //工序状态
    registrationTime: null,  //挂接时间
    startTime: null,  //上工时间
    startPosition: null,  //上工设备
    startBy: null,  //上工工号
    receipts: null,  //领用总数
    total: null,  //报工总数
    quantity: null,  //合格品数量
    unQuantity: null,  //不良品数量
    completionTime: null,  //报工时间
    completionPosition: null,  //报工设备
    completionBy: null,  //报工工号
    wipPlanSalesId: null,  //wip_plan_sales_id
    createTime: null,  //创建时间
    createBy: null,  //创建人
    updateTime: null,  //更新时间
    updateBy: null,  //更新人
}
export const tableList =[
    {
        type: "selection",
        prop: "id",
        header_align: "left",
        align: "left",
        fixed: "left",
        width: 40,
        min_width: 40,
        sortable: true,
        resizable: true,
        show_overflow_tooltip: true,
        show: true
    },
    {
        type: "default",
        label: "零件编号",
        prop: "partNo",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "标准数量",
        prop: "standardQuantity",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "标签编号",
        prop: "tagCode",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "产品流转号",
        prop: "productSerialNo",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "材料炉号",
        prop: "materialNo",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "工序号",
        prop: "processNo",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "工序名称",
        prop: "processName",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "工序类型",
        prop: "processType",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "工序状态",
        prop: "processState",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "挂接时间",
        prop: "registrationTime",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "上工时间",
        prop: "startTime",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "上工设备",
        prop: "startPosition",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "上工工号",
        prop: "startBy",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "领用总数",
        prop: "receipts",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "报工总数",
        prop: "total",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "合格品数量",
        prop: "quantity",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "不良品数量",
        prop: "unQuantity",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "报工时间",
        prop: "completionTime",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "报工设备",
        prop: "completionPosition",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "报工工号",
        prop: "completionBy",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "检验批次",
        prop: "inspectionBatch",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "计划ID",
        prop: "wipPlanSalesId",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "创建时间",
        prop: "createTime",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "创建人",
        prop: "createBy",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "更新时间",
        prop: "updateTime",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
    {
        type: "default",
        label: "更新人",
        prop: "updateBy",
        header_align: "left",
        align: "left",
        fixed: false,
        width: 180,
        min_width: 180,
        sortable: "custom",
        resizable: true,
        show_overflow_tooltip: true,
        show: true,
        search: "Input"
    },
]
export const editList =[
    {
        show: false,
        type: "hidden",
        label: "id",
        key: "id",
        span: 24
    },
    {
        show: true,
        type: "Input",
        label: "零件编号",
        key: "partNo",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "标准数量",
        key: "standardQuantity",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "标签编号",
        key: "tagCode",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "产品流转号",
        key: "productSerialNo",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "材料炉号",
        key: "materialNo",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "工序号",
        key: "processNo",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "工序名称",
        key: "processName",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "工序类型",
        key: "processType",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "工序状态",
        key: "processState",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "挂接时间",
        key: "registrationTime",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "上工时间",
        key: "startTime",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "上工设备",
        key: "startPosition",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "上工工号",
        key: "startBy",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "领用总数",
        key: "receipts",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "报工总数",
        key: "total",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "合格品数量",
        key: "quantity",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "不良品数量",
        key: "unQuantity",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "报工时间",
        key: "completionTime",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "报工设备",
        key: "completionPosition",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "报工工号",
        key: "completionBy",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "wip_plan_sales_id",
        key: "wipPlanSalesId",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "创建时间",
        key: "createTime",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "创建人",
        key: "createBy",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "更新时间",
        key: "updateTime",
        span: 12,
        data:{}
    },
    {
        show: true,
        type: "Input",
        label: "更新人",
        key: "updateBy",
        span: 12,
        data:{}
    },
]
export const PageMix={
    records:[],
    total: 0,
    size: 100,
    current: 1,
	orderItem: "wip_trace_task.order_no",
	ascending: true,
	queryEntity: {
		id: null,  //ID
		orderNo: null,  //工序序号
		processNo: null,  //工序号
		processName: null,  //工序名称
		processType: null,  //工序类型
		processState: null,  //工序状态
		startTime: null,  //上工时间
		startPosition: null,  //上工设备
		startBy: null,  //上工工号
		receipts: null,  //领用总数
		total: null,  //报工总数
		quantity: null,  //合格品数量
		unQuantity: null,  //不良品数量
		completionTime: null,  //报工时间
		completionPosition: null,  //报工设备
		completionBy: null,  //报工工号
		delFlag: null,  //逻辑删除标记
		createTime: null,  //创建时间
		createBy: null,  //创建人
		updateTime: null,  //更新时间
		updateBy: null,  //更新人
		wipRfidId: null,  //托盘ID
		partNo: null,  //零件编号
		nextProcessNo: null,  //下一工序
		standardQuantity: null,  //标准数量
		tagCode: null,  //标签编号
		productSerialNo: null,  //产品流转号
		materialNo: null,  //材料炉号
		registrationTime: null,  //挂接时间
		inspectionBatch: null,  //检验批次
		boxNo: null,  //所属箱号
		wipTraceTaskId: null,  //任务ID
		wipPlanSalesId: null  //计划ID
	},
	queryJSON: {
		id: "wipTraceTask.id",  //ID
		orderNo: "wipTraceTask.orderNo",  //工序序号
		processNo: "wipTraceTask.processNo",  //工序号
		processName: "wipTraceTask.processName",  //工序名称
		processType: "wipTraceTask.processType",  //工序类型
		processState: "wipTraceTask.processState",  //工序状态
		startTime: "wipTraceTask.startTime",  //上工时间
		startPosition: "wipTraceTask.startPosition",  //上工设备
		startBy: "wipTraceTask.startBy",  //上工工号
		receipts: "wipTraceTask.receipts",  //领用总数
		total: "wipTraceTask.total",  //报工总数
		quantity: "wipTraceTask.quantity",  //合格品数量
		unQuantity: "wipTraceTask.unQuantity",  //不良品数量
		completionTime: "wipTraceTask.completionTime",  //报工时间
		completionPosition: "wipTraceTask.completionPosition",  //报工设备
		completionBy: "wipTraceTask.completionBy",  //报工工号
		delFlag: "wipTraceTask.delFlag",  //逻辑删除标记
		createTime: "wipTraceTask.createTime",  //创建时间
		createBy: "wipTraceTask.createBy",  //创建人
		updateTime: "wipTraceTask.updateTime",  //更新时间
		updateBy: "wipTraceTask.updateBy",  //更新人
		wipRfidId: "wipTraceTask.wipRfidId",  //托盘ID
		partNo: "wipRfid.partNo",  //零件编号
		nextProcessNo: "wipRfid.nextProcessNo",  //零件编号
		standardQuantity: "wipRfid.standardQuantity",  //标准数量
		tagCode: "wipRfid.tagCode",  //标签编号
		productSerialNo: "wipRfid.productSerialNo",  //产品流转号
		materialNo: "wipRfid.materialNo",  //材料炉号
		registrationTime: "wipRfid.registrationTime",  //挂接时间
		inspectionBatch: "wipRfid.inspectionBatch",  //检验批次
		boxNo: "wipRfid.boxNo",  //所属箱号
		wipTraceTaskId: "wipRfid.wipTraceTaskId",  //任务ID
		wipPlanSalesId: "wipRfid.wipPlanSalesId",  //计划ID
	},
	likeSomeWord: null,
    betweenItem: "wipTraceTask.updateTime",
    betweenStart: null,
    betweenEnd: null
}

export function list() {
    return request({
        url: "/wip/wipTraceTask",
        method: 'get'
    })
}
export function getById(id) {
    return request({
        url: "/wip/wipTraceTask/" + id,
        method: 'get'
    })
}
export function findList(entityQuery) {
    return request({
        url: "/wip/wipTraceTask/findList",
        method: 'post',
        data: entityQuery
    })
}
export function findOne(entityQuery) {
    return request({
        url: "/wip/wipTraceTask/findOne",
        method: 'post',
        data: entityQuery
    })
}
export function pageMix(pageMix) {
    return request({
        url: "/wip/wipTraceTask/pageMix",
        method: 'post',
        data: pageMix
    })
}
export function pageMixJoin(pageMix) {
    return request({
        url: "/wip/wipTraceTask/pageMixJoin",
        method: 'post',
        data: pageMix
    })
}
export function insert(entityPut) {
    entityPut.id=null;
    return request({
        url: "/wip/wipTraceTask",
        method: 'put',
        data: entityPut
    })
}
export function update(entityPut) {
    return request({
        url: "/wip/wipTraceTask/update",
        method: 'put',
        data: entityPut
    })
}
export function del(ids) {
    return request({
        url: "/wip/wipTraceTask/" + ids,
        method: 'delete'
    })
}
export function deleteDeep(ids) {
    return request({
        url: "/wip/wipTraceTask/deep/" + ids,
        method: 'delete'
    })
}
export function distribute(list) {
    return request({
        url: "/wip/wipTraceTask/distribute",
        method: 'put',
        data: list
    })
}
export function start(entityPut) {
    return request({
        url: "/wip/wipTraceTask/start",
        method: 'put',
        data: entityPut
    })
}
export function completion(entityPut) {
    return request({
        url: "/wip/wipTraceTask/completion",
        method: 'put',
        data: entityPut
    })
}

export function getMachineListByProcessNO(processNo,partNo) {
    return request({
        url: "/wip/wipMachineProcess/getMachineListByProcessNO",
        method: 'get',
        params: {
            processNo:processNo,
            partNo:partNo
        }
    })
}